import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
// import { UserController } from './user/user.controller';
import { NewsController } from './news/news.controller';
// import { UserService } from './user/user.service';
import {UserModule} from './user/user.module'

// 引入数据库的及配置文件
import { TypeOrmModule, TypeOrmModuleOptions } from '@nestjs/typeorm';
import { LoginModule } from './login/login.module';
import { BookModule } from './book/book.module';
import { PartModule } from './part/part.module';
import { CatalogModule } from './catalog/catalog.module';

@Module({
  imports: [
    TypeOrmModule.forRoot(),
    UserModule,
    LoginModule,
    BookModule,
    PartModule,
    CatalogModule,
  ],
  controllers: [AppController, NewsController],
  providers: [AppService],
})
export class AppModule {}
